<html>
<head><meta charset="utf-8"><title>meeting 2020-09-22 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html">meeting 2020-09-22</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210900048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210900048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210900048">(Sep 22 2020 at 16:59)</a>:</h4>
<p>Hi <span class="user-group-mention" data-user-group-id="692">@WG-traits</span> <br>
Meeting in ~3 hours. We'll be having a design meeting on placeholder canonicalization and canonical vs instantiated program clauses</p>



<a name="210900096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210900096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210900096">(Sep 22 2020 at 16:59)</a>:</h4>
<p>(in case anyone forgot and wants to review anything before the meeting)</p>



<a name="210918649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210918649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210918649">(Sep 22 2020 at 19:20)</a>:</h4>
<p>I didn't really have time to to do the prep I had hoped to do</p>



<a name="210923629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923629">(Sep 22 2020 at 20:00)</a>:</h4>
<p>Hi <span class="user-group-mention" data-user-group-id="692">@WG-traits</span></p>



<a name="210923635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923635">(Sep 22 2020 at 20:00)</a>:</h4>
<p>Meeting time</p>



<a name="210923648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923648">(Sep 22 2020 at 20:00)</a>:</h4>
<p>I also did like no prep</p>



<a name="210923679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923679">(Sep 22 2020 at 20:00)</a>:</h4>
<p>Today's been busy</p>



<a name="210923727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923727">(Sep 22 2020 at 20:00)</a>:</h4>
<p>I really <em>wanted</em> to but I'm currently at like zero time for things that are not foundation-related and minimal upkeep</p>



<a name="210923747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923747">(Sep 22 2020 at 20:01)</a>:</h4>
<p>But I think we can try to talk about it now anyway</p>



<a name="210923756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923756">(Sep 22 2020 at 20:01)</a>:</h4>
<p>Definitely</p>



<a name="210923772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923772">(Sep 22 2020 at 20:01)</a>:</h4>
<p>But let's start with any announcments?</p>



<a name="210923801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923801">(Sep 22 2020 at 20:01)</a>:</h4>
<p>A few PRs got merged this week</p>



<a name="210923811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923811">(Sep 22 2020 at 20:01)</a>:</h4>
<ul>
<li>I'd like to request folks ping me with PRs and things. Assume that I am not seeing <em>any</em> github pings.</li>
</ul>



<a name="210923845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923845">(Sep 22 2020 at 20:01)</a>:</h4>
<p>Oh boy then, I have some for you</p>



<a name="210923907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923907">(Sep 22 2020 at 20:02)</a>:</h4>
<p>I <em>am</em> trying to stay on top of my to-do list, so I can add specific items on there :)</p>



<a name="210923952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923952">(Sep 22 2020 at 20:02)</a>:</h4>
<p>PRs merged this week: <code>CoerceUnsized</code> rules, auto traits for the simple builtin types</p>



<a name="210923986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923986">(Sep 22 2020 at 20:02)</a>:</h4>
<p>Github is weird and isn't sorting by updated correctly</p>



<a name="210923991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210923991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210923991">(Sep 22 2020 at 20:03)</a>:</h4>
<p>oh well</p>



<a name="210924004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924004">(Sep 22 2020 at 20:03)</a>:</h4>
<p>Also a couple PRs ready for review</p>



<a name="210924017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924017">(Sep 22 2020 at 20:03)</a>:</h4>
<p>I have nothing, I've been wrestling <a href="https://github.com/rust-lang/rust/issues/50753">https://github.com/rust-lang/rust/issues/50753</a> all week</p>



<a name="210924024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924024">(Sep 22 2020 at 20:03)</a>:</h4>
<p><span class="user-mention" data-user-id="125294">@Aaron Hill</span> implemented generators</p>



<a name="210924038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924038">(Sep 22 2020 at 20:03)</a>:</h4>
<p>Which <span class="user-mention" data-user-id="116009">@nikomatsakis</span> needs to review</p>



<a name="210924065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924065">(Sep 22 2020 at 20:03)</a>:</h4>
<p>Yeah, weirdly enough it's sorted by creation date, which is not useful</p>



<a name="210924088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924088">(Sep 22 2020 at 20:03)</a>:</h4>
<p>I PRed some cleanup of chalk-engine that I've had for a while (<a href="https://github.com/rust-lang/rust/issues/611">#611</a>)</p>



<a name="210924097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924097">(Sep 22 2020 at 20:03)</a>:</h4>
<p>Which anyone can view</p>



<a name="210924192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924192">(Sep 22 2020 at 20:04)</a>:</h4>
<p>(I think you mean <a href="https://github.com/rust-lang-nursery/chalk/issues/611">chalk#611</a>)</p>



<a name="210924208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924208">(Sep 22 2020 at 20:04)</a>:</h4>
<p>Oh, I know why it's weird. I cleaned up some branches in my fork and that "updated" the PR</p>



<a name="210924219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924219">(Sep 22 2020 at 20:04)</a>:</h4>
<p><span class="user-mention" data-user-id="230601">@Nathan Whitaker</span> yes, whoops</p>



<a name="210924255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924255">(Sep 22 2020 at 20:05)</a>:</h4>
<p>Don't have anything either, started with static lifetimes but didn't have time to finish it yet</p>



<a name="210924300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924300">(Sep 22 2020 at 20:05)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202020-09-22/near/210924024">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> implemented generators</p>
</blockquote>
<p>PR?</p>



<a name="210924322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924322">(Sep 22 2020 at 20:05)</a>:</h4>
<p><a href="https://github.com/rust-lang-nursery/chalk/issues/593">chalk#593</a></p>



<a name="210924397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924397">(Sep 22 2020 at 20:06)</a>:</h4>
<p>I finally got around to finishing the WIP PR :)</p>



<a name="210924409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924409">(Sep 22 2020 at 20:06)</a>:</h4>
<p>I'll work on adding docs today or tomorrow</p>



<a name="210924415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924415">(Sep 22 2020 at 20:06)</a>:</h4>
<p>ok I added that to my to do list, along with <a href="https://github.com/rust-lang-nursery/chalk/issues/611">chalk#611</a></p>



<a name="210924435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924435">(Sep 22 2020 at 20:06)</a>:</h4>
<p>I can shoot to review those on thu or friday</p>



<a name="210924454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924454">(Sep 22 2020 at 20:06)</a>:</h4>
<p>On the rustc side, I opened <a href="https://github.com/rust-lang/rust/issues/76814">#76814</a> to test performance. And it was awful</p>



<a name="210924511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924511">(Sep 22 2020 at 20:07)</a>:</h4>
<p>I also did a little work locally cleaning up going to/from binders, but haven't pushed</p>



<a name="210924519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924519">(Sep 22 2020 at 20:07)</a>:</h4>
<p>it <em>might</em> help perf a bit</p>



<a name="210924529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924529">(Sep 22 2020 at 20:07)</a>:</h4>
<p>LOL</p>



<a name="210924555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924555">(Sep 22 2020 at 20:07)</a>:</h4>
<p>I'm not super surprised, I have to say</p>



<a name="210924611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924611">(Sep 22 2020 at 20:08)</a>:</h4>
<p>I'll skim the PR, this may not be the smartest way to do things, also</p>



<a name="210924618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924618">(Sep 22 2020 at 20:08)</a>:</h4>
<p>Probably not</p>



<a name="210924664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924664">(Sep 22 2020 at 20:08)</a>:</h4>
<p>ok, I see what it did</p>



<a name="210924695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924695">(Sep 22 2020 at 20:08)</a>:</h4>
<p>good data point :)</p>



<a name="210924707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924707">(Sep 22 2020 at 20:08)</a>:</h4>
<p>it is sort of the "naive strategy"</p>



<a name="210924723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924723">(Sep 22 2020 at 20:09)</a>:</h4>
<p>yeah, not very smart</p>



<a name="210924785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924785">(Sep 22 2020 at 20:09)</a>:</h4>
<p>I have a small thing I want to discuss if we have some time left in this meeting (an abstraction I wanted in <a href="https://github.com/rust-lang-nursery/chalk/issues/607">chalk#607</a>)</p>



<a name="210924806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924806">(Sep 22 2020 at 20:09)</a>:</h4>
<p>wrong one</p>



<a name="210924819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924819">(Sep 22 2020 at 20:09)</a>:</h4>
<p>I also tried to go the other way in Chalk (again), by having <code>Binders</code> <em>not</em> track the bound vars. That...also didn't work out great. Never got tests passing.</p>



<a name="210924901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924901">(Sep 22 2020 at 20:10)</a>:</h4>
<p>In Chalk, we often have <code>for&lt;Self&gt; ...</code> where we never actually name <code>Self</code>in the bound type</p>



<a name="210924910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924910">(Sep 22 2020 at 20:10)</a>:</h4>
<p>but I digress</p>



<a name="210924914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924914">(Sep 22 2020 at 20:10)</a>:</h4>
<p>Back to meeting</p>



<a name="210924917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924917">(Sep 22 2020 at 20:10)</a>:</h4>
<p>hmm yes</p>



<a name="210924925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924925">(Sep 22 2020 at 20:10)</a>:</h4>
<p>the fact that chalk is more expressive is interesting</p>



<a name="210924953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924953">(Sep 22 2020 at 20:11)</a>:</h4>
<p><span class="user-mention" data-user-id="251766">@Areredify</span> yes, we can discuss if we have time</p>



<a name="210924977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924977">(Sep 22 2020 at 20:11)</a>:</h4>
<p>We're 10 minutes in though, and considering we didn't prep, I imagine it's gonna take some time</p>



<a name="210924991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924991">(Sep 22 2020 at 20:11)</a>:</h4>
<p>Okay, so placeholder canonicalization</p>



<a name="210924997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210924997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210924997">(Sep 22 2020 at 20:11)</a>:</h4>
<p>Anybody want to summarize?</p>



<a name="210925085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925085">(Sep 22 2020 at 20:12)</a>:</h4>
<p>Well</p>



<a name="210925092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925092">(Sep 22 2020 at 20:12)</a>:</h4>
<p>without the "person typing thing" it's more awkward now</p>



<a name="210925102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925102">(Sep 22 2020 at 20:12)</a>:</h4>
<p>I can do a bit of summary</p>



<a name="210925173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925173">(Sep 22 2020 at 20:13)</a>:</h4>
<p>I guess, to start, when chalk canonicalizes something that involve "placeholders"</p>



<a name="210925182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925182">(Sep 22 2020 at 20:13)</a>:</h4>
<p>it currently leaves them unchanged</p>



<a name="210925192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925192">(Sep 22 2020 at 20:13)</a>:</h4>
<p>(everybody knows what "placeholder" means?)</p>



<a name="210925216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925216">(Sep 22 2020 at 20:13)</a>:</h4>
<p>I guess I should introduce some notation</p>



<a name="210925226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925226">(Sep 22 2020 at 20:13)</a>:</h4>
<p>(also, basics on canonicalization <a href="https://rust-lang.github.io/chalk/book/canonical_queries/canonicalization.html">here</a>)</p>



<a name="210925294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925294">(Sep 22 2020 at 20:14)</a>:</h4>
<p>so e.g. if you have <code>Implemented(!U1: Trait)</code> -- the <code>!U1</code> here is a 'placeholder', and let's say it's in universe 1</p>



<a name="210925346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925346">(Sep 22 2020 at 20:14)</a>:</h4>
<p>(that could correspond to some in-scope generic type or whatever)</p>



<a name="210925394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925394">(Sep 22 2020 at 20:14)</a>:</h4>
<p>so you might have <code>Implemented(!U1: PartialEq&lt;!U3&gt;)</code>, and this would be canonicalized to yield the same value</p>



<a name="210925418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925418">(Sep 22 2020 at 20:15)</a>:</h4>
<p>but chalk also has this idea of "universe-canonicalization" that would then go and try to renumber the universes to collapse it down</p>



<a name="210925428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925428">(Sep 22 2020 at 20:15)</a>:</h4>
<p>this is worth digging into a bit</p>



<a name="210925509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925509">(Sep 22 2020 at 20:15)</a>:</h4>
<p>in particular, that thing has a placeholder from universe 1 and 3 -- but the absolute universe numbers don't matter when you try to solve it,</p>



<a name="210925559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925559">(Sep 22 2020 at 20:16)</a>:</h4>
<p>all that matters is that one type is in a higher universe than the other</p>



<a name="210925568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925568">(Sep 22 2020 at 20:16)</a>:</h4>
<p>this could come e.g. from a query like</p>



<a name="210925595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925595">(Sep 22 2020 at 20:16)</a>:</h4>
<p>So, maybe it's worth mentioning what universes are? And how they are different from e.g. binders</p>



<a name="210925615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925615">(Sep 22 2020 at 20:16)</a>:</h4>
<div class="codehilite"><pre><span></span><code>forall&lt;T&gt; { forall&lt;U&gt; { forall&lt;V&gt; { T: PartialEq&lt;V&gt; } }
</code></pre></div>



<a name="210925644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925644">(Sep 22 2020 at 20:16)</a>:</h4>
<p>ok, a <em>universe</em> is introduced when you traverse a "forall" binder like this</p>



<a name="210925703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925703">(Sep 22 2020 at 20:17)</a>:</h4>
<p>it basically extends the set of types with some new, fresh types (what we call <em>placeholders</em>) that don't stand for any specific type, but are rather meant to represent "any type"</p>



<a name="210925755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925755">(Sep 22 2020 at 20:17)</a>:</h4>
<p>this is kind of skolemization from logic, idk, people use that word to mean different things</p>



<a name="210925852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925852">(Sep 22 2020 at 20:18)</a>:</h4>
<p>anyway the universes are numbered such that a higher number means "more types"</p>



<a name="210925880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925880">(Sep 22 2020 at 20:18)</a>:</h4>
<p>so in this case, there are three foralls, and they might introduce U1, U2, and U3 -- U3 has the most types, since it includs T, U, <em>and</em> V</p>



<a name="210925889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925889">(Sep 22 2020 at 20:18)</a>:</h4>
<p>U2 only includes T and U</p>



<a name="210925891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925891">(Sep 22 2020 at 20:18)</a>:</h4>
<p>etc</p>



<a name="210925936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925936">(Sep 22 2020 at 20:19)</a>:</h4>
<p>U0 is outside all the foralls, and so it includes only  the structs that the user declared (at least that's the general idea)</p>



<a name="210925965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925965">(Sep 22 2020 at 20:19)</a>:</h4>
<p>each (existential) type variable is placed into a universe, indicating what kinds of types it can name</p>



<a name="210925979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210925979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210925979">(Sep 22 2020 at 20:19)</a>:</h4>
<p>(make sense so far?)</p>



<a name="210926059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926059">(Sep 22 2020 at 20:20)</a>:</h4>
<p>So U0 is the outermost one, and U1 the innermost one?</p>



<a name="210926127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926127">(Sep 22 2020 at 20:20)</a>:</h4>
<p>No</p>



<a name="210926132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mark Drobnak <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926132">(Sep 22 2020 at 20:20)</a>:</h4>
<p>Relatively innermost, I think in this case <del>U2 (0-indexed)</del> U3 is the innermost</p>



<a name="210926150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926150">(Sep 22 2020 at 20:20)</a>:</h4>
<p>U0 is the outermost (i.e., outside of all <code>forall</code>)</p>



<a name="210926160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926160">(Sep 22 2020 at 20:20)</a>:</h4>
<p>but each <code>forall</code> introduces a universe</p>



<a name="210926188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926188">(Sep 22 2020 at 20:21)</a>:</h4>
<p>what <span class="user-mention" data-user-id="218805">@Mark Drobnak</span> said sounds right :)</p>



<a name="210926243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926243">(Sep 22 2020 at 20:21)</a>:</h4>
<p><span class="user-mention" data-user-id="218805">@Mark Drobnak</span> it was right before, <code>U3</code> is the innermost</p>



<a name="210926258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926258">(Sep 22 2020 at 20:22)</a>:</h4>
<p>U0 is implicitly always there</p>



<a name="210926322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926322">(Sep 22 2020 at 20:22)</a>:</h4>
<p>So the purpose of canonicalization, to step back 1 sec, is to reduce "equivalent"queries into, well, a canonical form</p>



<a name="210926334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926334">(Sep 22 2020 at 20:22)</a>:</h4>
<p>i.e., to recognize when you have two queries that will have the same result</p>



<a name="210926379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926379">(Sep 22 2020 at 20:23)</a>:</h4>
<p>so e.g. <code>u32: PartialEq&lt;?T&gt;</code> and <code>u32: PartialEq&lt;?U&gt;</code> are equivalent, because it doesn't matter whether the unbound type variable is called <code>?T</code> or <code>?U</code></p>



<a name="210926391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926391">(Sep 22 2020 at 20:23)</a>:</h4>
<p>the thing is that the same thing applies to placeholders</p>



<a name="210926402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926402">(Sep 22 2020 at 20:23)</a>:</h4>
<p>all that matters is their relative universes, essentially</p>



<a name="210926436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926436">(Sep 22 2020 at 20:23)</a>:</h4>
<p>what we do with canonicalization is to kind of rename things to canonical names and maintain a mapping so we can map things back</p>



<a name="210926470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926470">(Sep 22 2020 at 20:23)</a>:</h4>
<p>and you can do the same with universes (and indeed chalk does so today, though it used to have a bug, which I think <span class="user-mention" data-user-id="251766">@Areredify</span> we fixed, right?)</p>



<a name="210926548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926548">(Sep 22 2020 at 20:24)</a>:</h4>
<p>we did, we used to sometimes ignore inference var universes</p>



<a name="210926550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926550">(Sep 22 2020 at 20:24)</a>:</h4>
<p><em>however</em>, we can do this in a better way, I think is roughly the motivation</p>



<a name="210926566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926566">(Sep 22 2020 at 20:24)</a>:</h4>
<p>or at least what I think is a better way :)</p>



<a name="210926587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926587">(Sep 22 2020 at 20:24)</a>:</h4>
<p>I'm trying to remember if there is further motivation within rustc</p>



<a name="210926683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926683">(Sep 22 2020 at 20:25)</a>:</h4>
<p>...skimming the <a href="http://rust-lang.github.io/chalk/chalk_ir/struct.Canonical.html">chalk <code>Canonical</code> type</a> type... I guess there is no field for "max universe'..</p>



<a name="210926694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926694">(Sep 22 2020 at 20:25)</a>:</h4>
<p>anyway, I thought maybe it's good to go back to the original example</p>



<a name="210926752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926752">(Sep 22 2020 at 20:26)</a>:</h4>
<p>since we've gone over the background</p>



<a name="210926768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926768">(Sep 22 2020 at 20:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202020-09-22/near/210925294">said</a>:</p>
<blockquote>
<p>so e.g. if you have <code>Implemented(!U1: Trait)</code> -- the <code>!U1</code> here is a 'placeholder', and let's say it's in universe 1</p>
</blockquote>



<a name="210926773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926773">(Sep 22 2020 at 20:26)</a>:</h4>
<p>That would be in <code>UCanonical</code> <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="210926786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926786">(Sep 22 2020 at 20:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202020-09-22/near/210925394">said</a>:</p>
<blockquote>
<p>so you might have <code>Implemented(!U1: PartialEq&lt;!U3&gt;)</code>, and this would be canonicalized to yield the same value</p>
</blockquote>



<a name="210926808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926808">(Sep 22 2020 at 20:26)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/blob/master/chalk-ir/src/lib.rs#L2146">https://github.com/rust-lang/chalk/blob/master/chalk-ir/src/lib.rs#L2146</a></p>



<a name="210926813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926813">(Sep 22 2020 at 20:26)</a>:</h4>
<p>ah, thanks!</p>



<a name="210926826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926826">(Sep 22 2020 at 20:26)</a>:</h4>
<p><a href="http://rust-lang.github.io/chalk/chalk_ir/struct.UCanonical.html"><code>UCanonical</code></a>, for those who prefer rustdoc :)</p>



<a name="210926839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926839">(Sep 22 2020 at 20:27)</a>:</h4>
<p>In Chalk, these are split</p>



<a name="210926849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926849">(Sep 22 2020 at 20:27)</a>:</h4>
<p>In rustc, they  don't seem to be?</p>



<a name="210926869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926869">(Sep 22 2020 at 20:27)</a>:</h4>
<p>so let's say the example was <code>Implemented(!U5: PartialEq&lt;!U7&gt;)</code></p>



<a name="210926891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926891">(Sep 22 2020 at 20:27)</a>:</h4>
<p>i'm trying to come up with a good rule to show you why this might matter</p>



<a name="210926975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210926975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210926975">(Sep 22 2020 at 20:28)</a>:</h4>
<p>I guess I need to make a more complex example, I think it comes up more often in the environment clauses</p>



<a name="210927048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927048">(Sep 22 2020 at 20:29)</a>:</h4>
<p>but basically the way the universes matter is like "can some inference variable be equated with both types" -- maybe we wind up with a variable that is only in universe 5</p>



<a name="210927102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927102">(Sep 22 2020 at 20:29)</a>:</h4>
<p>ok there is one other detail that matters</p>



<a name="210927117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927117">(Sep 22 2020 at 20:29)</a>:</h4>
<p>placeholders are identified not only by <em>universe</em> but by index</p>



<a name="210927143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927143">(Sep 22 2020 at 20:29)</a>:</h4>
<p>maybe this helps to show :)</p>



<a name="210927205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927205">(Sep 22 2020 at 20:30)</a>:</h4>
<p>imagine we have to prove <code>forall&lt;T, U&gt; { T: PartialEq&lt;U&gt; }</code></p>



<a name="210927230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927230">(Sep 22 2020 at 20:30)</a>:</h4>
<p>this ought to be the same, presumably, as <code>forall&lt;U, T&gt; { T: PartialEq&lt;U&gt; }</code></p>



<a name="210927307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927307">(Sep 22 2020 at 20:30)</a>:</h4>
<p>the way we actually handle this in chalk is that we'd introduce one universe, with two placeholders in it</p>



<a name="210927322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927322">(Sep 22 2020 at 20:31)</a>:</h4>
<p>they'd be identified like <code>!U1.0</code> and <code>!U1.1</code></p>



<a name="210927374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927374">(Sep 22 2020 at 20:31)</a>:</h4>
<p>so those two goals would wind up looking different:</p>
<ul>
<li><code>!U1.0: PartialEq&lt;!U1.1&gt;</code></li>
<li><code>!U1.1: PartialEq&lt;!U1.0&gt;</code></li>
</ul>



<a name="210927394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927394">(Sep 22 2020 at 20:31)</a>:</h4>
<p>universe canonicalization by itself can't fix this</p>



<a name="210927404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927404">(Sep 22 2020 at 20:31)</a>:</h4>
<p>there is only one universe, and it's got the canonical number :)</p>



<a name="210927424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927424">(Sep 22 2020 at 20:32)</a>:</h4>
<p>what we would probably <em>like</em> is to renumber them in the order of appearance, the same way we do with existential variables</p>



<a name="210927526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927526">(Sep 22 2020 at 20:32)</a>:</h4>
<p>that is, we need to preserve the relative universe, and we need to preserve the fact that these were two distinct placeholders, but we don't need to preserve their original universes/names</p>



<a name="210927535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927535">(Sep 22 2020 at 20:32)</a>:</h4>
<p>Yes, but how do you define "order of appearance"? Just by walking the type?</p>



<a name="210927541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927541">(Sep 22 2020 at 20:32)</a>:</h4>
<p>Yes</p>



<a name="210927548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927548">(Sep 22 2020 at 20:32)</a>:</h4>
<p>that's what we do with canonicalization now</p>



<a name="210927581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927581">(Sep 22 2020 at 20:33)</a>:</h4>
<p>the order is arbitrary, it just needs to be consistent</p>



<a name="210927646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927646">(Sep 22 2020 at 20:33)</a>:</h4>
<p>today, we walk the type, and when we encounter inference variables, we add things into the "canonical binder"</p>



<a name="210927656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927656">(Sep 22 2020 at 20:33)</a>:</h4>
<p>the idea is basically to extend that also to placeholders</p>



<a name="210927673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927673">(Sep 22 2020 at 20:33)</a>:</h4>
<p>there is an added benefit there --</p>



<a name="210927778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927778">(Sep 22 2020 at 20:34)</a>:</h4>
<p>now the canonical form of that goal above would be <code>^0: PartialEq&lt;^1&gt;</code> where <code>^0</code> and <code>^1</code> are bound variables referring into the canonical binder (which would indicate that they are universally bound in index 1)</p>



<a name="210927803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927803">(Sep 22 2020 at 20:34)</a>:</h4>
<p>the nice benefit is that "universe canonicalization" can be done now by just looking at the binder</p>



<a name="210927822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927822">(Sep 22 2020 at 20:34)</a>:</h4>
<p>and doesn't need to walk the canonical term itself</p>



<a name="210927841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927841">(Sep 22 2020 at 20:35)</a>:</h4>
<p>because any placeholders in there are now bound variables</p>



<a name="210927868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210927868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210927868">(Sep 22 2020 at 20:35)</a>:</h4>
<p>(term = PL jargon, it just means "the type/goal/whatever that was canonicalized")</p>



<a name="210928037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928037">(Sep 22 2020 at 20:36)</a>:</h4>
<p>Okay, so, this sounds reasonable</p>



<a name="210928078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928078">(Sep 22 2020 at 20:36)</a>:</h4>
<p>Would there be any reason we <em>don't</em> want to canonicalize placeholders?</p>



<a name="210928093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928093">(Sep 22 2020 at 20:37)</a>:</h4>
<p>I can't really think of one to be honest</p>



<a name="210928101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928101">(Sep 22 2020 at 20:37)</a>:</h4>
<p>I'm trying to remember why we did it for rustc</p>



<a name="210928102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mark Drobnak <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928102">(Sep 22 2020 at 20:37)</a>:</h4>
<p>So is this case just not handled today? How are things working? :)</p>



<a name="210928125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928125">(Sep 22 2020 at 20:37)</a>:</h4>
<p>Yeah, today they're just canonicalized to different terms</p>



<a name="210928129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928129">(Sep 22 2020 at 20:37)</a>:</h4>
<p>so we just get less caching</p>



<a name="210928163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mark Drobnak <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928163">(Sep 22 2020 at 20:37)</a>:</h4>
<p>Ok, so this would avoid the duplicate work that is currently going on</p>



<a name="210928186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928186">(Sep 22 2020 at 20:37)</a>:</h4>
<p>in rustc it <em>does</em> canonicalize placeholders, which is either because I realized the stuff above, or because something about the interning setup kind of forced me into it :)</p>



<a name="210928257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928257">(Sep 22 2020 at 20:38)</a>:</h4>
<p>yes, to be clear, I don't know that it's super cricitical. It would also make "universe canonicalization" more efficient</p>



<a name="210928270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928270">(Sep 22 2020 at 20:38)</a>:</h4>
<p>so now for the real question then</p>



<a name="210928272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928272">(Sep 22 2020 at 20:38)</a>:</h4>
<p>one other thing--</p>



<a name="210928284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928284">(Sep 22 2020 at 20:38)</a>:</h4>
<p>you don't <em>always</em> want to canonicalize universes,</p>



<a name="210928305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928305">(Sep 22 2020 at 20:38)</a>:</h4>
<p>but that's really because there are two sort of "directions" for canonicalizing</p>



<a name="210928321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928321">(Sep 22 2020 at 20:38)</a>:</h4>
<p>when you are canonicalizing the <em>query</em> (the goal you are trying to solve)</p>



<a name="210928333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928333">(Sep 22 2020 at 20:38)</a>:</h4>
<p>versus the <em>answer</em> for that query (which wants to refer to universes etc from the query)</p>



<a name="210928367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928367">(Sep 22 2020 at 20:39)</a>:</h4>
<p>so e.g. if the query is like <code>(!U1, !U2, !U3, ?X): Foo</code> and the answer is <code>?X = (!U1, !U3)</code></p>



<a name="210928384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928384">(Sep 22 2020 at 20:39)</a>:</h4>
<p>you can't canonicalize that answer to <code>(!U1, !U2)</code>, that's just nonsense</p>



<a name="210928404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928404">(Sep 22 2020 at 20:39)</a>:</h4>
<p>sorry that's a very weird example, not a realistic trait at all</p>



<a name="210928439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928439">(Sep 22 2020 at 20:40)</a>:</h4>
<p>Hmm</p>



<a name="210928479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mark Drobnak <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928479">(Sep 22 2020 at 20:40)</a>:</h4>
<p>The canonical answer wouldn't be able to flatten !U3 to !U2 because the query includes 1-3, right?</p>



<a name="210928492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mark Drobnak <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928492">(Sep 22 2020 at 20:40)</a>:</h4>
<p>(that's my naive thought)</p>



<a name="210928533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928533">(Sep 22 2020 at 20:40)</a>:</h4>
<p>oh yeah, I was hung up on answer unification in my canonicalization branch</p>



<a name="210928542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928542">(Sep 22 2020 at 20:40)</a>:</h4>
<p>among other things</p>



<a name="210928560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928560">(Sep 22 2020 at 20:41)</a>:</h4>
<p>(also, time check, we're at 20 minutes left. We should probably talk about canonical vs instantiated program clauses)</p>



<a name="210928629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928629">(Sep 22 2020 at 20:42)</a>:</h4>
<p><span class="user-mention" data-user-id="218805">@Mark Drobnak</span> right</p>



<a name="210928673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928673">(Sep 22 2020 at 20:42)</a>:</h4>
<p>basically the answer is referring back to parts from the query</p>



<a name="210928684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928684">(Sep 22 2020 at 20:42)</a>:</h4>
<p>so there is a bit difference between saying U1, U3 and U1, U2</p>



<a name="210928710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928710">(Sep 22 2020 at 20:42)</a>:</h4>
<p>like if the query was like <code>(A, B, C, ?D)</code>, and we are asking what is <code>?D</code>, is matters if the answer is <code>(A, C)</code> or <code>(A, B)</code></p>



<a name="210928744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928744">(Sep 22 2020 at 20:42)</a>:</h4>
<p>really canonicalization only barely makes sense on the answer anyway</p>



<a name="210928773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928773">(Sep 22 2020 at 20:43)</a>:</h4>
<p>we use it because it's the way we "traverse" answers from one inference context to another,</p>



<a name="210928781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928781">(Sep 22 2020 at 20:43)</a>:</h4>
<p>and because answers can sometimes introduce bound variables</p>



<a name="210928821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928821">(Sep 22 2020 at 20:43)</a>:</h4>
<p>e.g., imagine, <code>impl&lt;A, B&gt; SomeTrait&lt;(A, B)&gt; for u32</code> and you ask <code>u32: SomeTrait&lt;?X&gt;</code></p>



<a name="210928830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210928830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210928830">(Sep 22 2020 at 20:43)</a>:</h4>
<p>the answer is going to be <code>?X = (?Y, ?Z)</code> for some fresh variables <code>?Y</code> and <code>?Z</code></p>



<a name="210929020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929020">(Sep 22 2020 at 20:45)</a>:</h4>
<p>Okay</p>



<a name="210929025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929025">(Sep 22 2020 at 20:45)</a>:</h4>
<p>so</p>



<a name="210929036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929036">(Sep 22 2020 at 20:45)</a>:</h4>
<p>Program clauses?</p>



<a name="210929086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929086">(Sep 22 2020 at 20:46)</a>:</h4>
<p>yeah, I dont' quite understand what that topic is about</p>



<a name="210929094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929094">(Sep 22 2020 at 20:46)</a>:</h4>
<p>oh right</p>



<a name="210929105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929105">(Sep 22 2020 at 20:46)</a>:</h4>
<p>I forgot :)</p>



<a name="210929148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929148">(Sep 22 2020 at 20:47)</a>:</h4>
<p>so as part of solving a goal we have to ask the database for "all possibly relevant program clauses"</p>



<a name="210929164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929164">(Sep 22 2020 at 20:47)</a>:</h4>
<p>and the question is whether we ask that question by supplying a <em>canonical form of the goal</em></p>



<a name="210929171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929171">(Sep 22 2020 at 20:47)</a>:</h4>
<p>or an <em>instantiated one</em></p>



<a name="210929196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929196">(Sep 22 2020 at 20:47)</a>:</h4>
<p>in particular, if we do the latter, then the bound variables in the canonical form will be replaced with existential or placeholder inference variables?</p>



<a name="210929230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929230">(Sep 22 2020 at 20:47)</a>:</h4>
<p>right now recursive solver supplies canonical form, and the SLG solver uses instantiated form</p>



<a name="210929259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929259">(Sep 22 2020 at 20:48)</a>:</h4>
<p>is that the case?</p>



<a name="210929295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929295">(Sep 22 2020 at 20:48)</a>:</h4>
<p>Or is it the other way around</p>



<a name="210929306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929306">(Sep 22 2020 at 20:48)</a>:</h4>
<p>that is the case unless something changed</p>



<a name="210929314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nathan Whitaker <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929314">(Sep 22 2020 at 20:48)</a>:</h4>
<p>I think that's right</p>



<a name="210929317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929317">(Sep 22 2020 at 20:48)</a>:</h4>
<p>which would surprise me</p>



<a name="210929354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929354">(Sep 22 2020 at 20:48)</a>:</h4>
<p>yes</p>



<a name="210929356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929356">(Sep 22 2020 at 20:48)</a>:</h4>
<p>using the canoncial form revealed several cases that I would call bugs in the original code</p>



<a name="210929366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929366">(Sep 22 2020 at 20:48)</a>:</h4>
<p>the original code could cheat a little a bit</p>



<a name="210929384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929384">(Sep 22 2020 at 20:48)</a>:</h4>
<p>that is to say, when using the instantiated form, you can cheat</p>



<a name="210929440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929440">(Sep 22 2020 at 20:49)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202020-09-22/near/210929196">said</a>:</p>
<blockquote>
<p>in particular, if we do the latter, then the bound variables in the canonical form will be replaced with existential or placeholder inference variables?</p>
</blockquote>
<p>what do you mean, placeholder bound vars would get instantiated to placeholder vars, inference bound vars to inference vars</p>



<a name="210929445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929445">(Sep 22 2020 at 20:49)</a>:</h4>
<p>in particular, if you had a goal like <code>Implemented(?T: Clone)</code> (say), you could generate a program clause that referred directly to this instantiated variable <code>?T</code> -- e.g., <code>Implemented(?T: Clone) :- Implemented(?T: Copy)</code></p>



<a name="210929451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929451">(Sep 22 2020 at 20:49)</a>:</h4>
<p>I think we did this for supertraits, in particular</p>



<a name="210929514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929514">(Sep 22 2020 at 20:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="251766">Areredify</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202020-09-22/near/210929440">said</a>:</p>
<blockquote>
<p>what do you mean, placeholder bound vars would get instantiated to placeholder vars, inference bound vars to inference vars</p>
</blockquote>
<p>this is what I meant</p>



<a name="210929548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929548">(Sep 22 2020 at 20:50)</a>:</h4>
<p>oh ok</p>



<a name="210929587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929587">(Sep 22 2020 at 20:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202020-09-22/near/210929445">said</a>:</p>
<blockquote>
<p>in particular, if you had a goal like <code>Implemented(?T: Clone)</code> (say), you could generate a program clause that referred directly to this instantiated variable <code>?T</code> -- e.g., <code>Implemented(?T: Clone) :- Implemented(?T: Copy)</code></p>
</blockquote>
<p>what we do now instead is to generate a program clause like</p>
<div class="codehilite"><pre><span></span><code>forall&lt;X&gt; {
    Implemented(X: Clone) :- Implemented(X: Copy)
}
</code></pre></div>


<p>(actually it's <code>FromEnv</code>, I realize, but that's orthogonal)</p>



<a name="210929617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929617">(Sep 22 2020 at 20:51)</a>:</h4>
<p>the point is, we generate program clauses that have no "free variables" (and don't name inference variables)</p>



<a name="210929624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929624">(Sep 22 2020 at 20:51)</a>:</h4>
<p>that's really what we want, I think</p>



<a name="210929665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929665">(Sep 22 2020 at 20:51)</a>:</h4>
<p>at least it fits my expectation, which is that these program clauses are things that conceivably could have been written into some program, independent of any particular goal that is being solved</p>



<a name="210929735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929735">(Sep 22 2020 at 20:52)</a>:</h4>
<p>(in some cases, we may generate an open-ended set of such rules, which <em>does</em> use information from the goal, but that's just because there could be infinitely many of them)</p>



<a name="210929811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929811">(Sep 22 2020 at 20:53)</a>:</h4>
<p>anyway I kind of think it's better to generate with the bound form I guess in part because it lets you figure out what rules might apply before you do the work of instantiating; I'm not sure what the downside is -- one of them is that, if we implement placeholder canonicalization, then the code has to do carry along the canonical information so it can tell if a bound variable is a universal or existential variable</p>



<a name="210929844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929844">(Sep 22 2020 at 20:53)</a>:</h4>
<p>(definitely writing the code to work <em>both</em> ways is annoying)</p>



<a name="210929850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929850">(Sep 22 2020 at 20:53)</a>:</h4>
<p>Are there other downsides?</p>



<a name="210929882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929882">(Sep 22 2020 at 20:53)</a>:</h4>
<p>I think that's the big one?</p>



<a name="210929941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929941">(Sep 22 2020 at 20:54)</a>:</h4>
<p>that does admittedly sound kind of annoying :)</p>



<a name="210929947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929947">(Sep 22 2020 at 20:54)</a>:</h4>
<p>Would it be slightly less efficient, since you need to 'instantiate' the program clause, instead of directly using it?</p>



<a name="210929956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929956">(Sep 22 2020 at 20:54)</a>:</h4>
<p>that's already true</p>



<a name="210929959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929959">(Sep 22 2020 at 20:54)</a>:</h4>
<p>I don't know if that's actually a measurable difference</p>



<a name="210929991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210929991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210929991">(Sep 22 2020 at 20:54)</a>:</h4>
<p>but I guess the point is that in this <em>particular</em> example you wouldn't have had to, since there wouldn't be bound things</p>



<a name="210930001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930001">(Sep 22 2020 at 20:54)</a>:</h4>
<p>yeah, I don't know, maybe. the code is also a bit more complex to generate the proper answer.</p>



<a name="210930025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930025">(Sep 22 2020 at 20:55)</a>:</h4>
<p>one thing is that I would really like to be caching this work of generating program clauses</p>



<a name="210930047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930047">(Sep 22 2020 at 20:55)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202020-09-22/near/210929587">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202020-09-22/near/210929445">said</a>:</p>
<blockquote>
<p>in particular, if you had a goal like <code>Implemented(?T: Clone)</code> (say), you could generate a program clause that referred directly to this instantiated variable <code>?T</code> -- e.g., <code>Implemented(?T: Clone) :- Implemented(?T: Copy)</code></p>
</blockquote>
<p>what we do now instead is to generate a program clause like</p>
<div class="codehilite"><pre><span></span><code>forall&lt;X&gt; {
    Implemented(X: Clone) :- Implemented(X: Copy)
}
</code></pre></div>


<p>(actually it's <code>FromEnv</code>, I realize, but that's orthogonal)</p>
</blockquote>
<p>don't we break that assumption with builtin traits impls?</p>



<a name="210930051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930051">(Sep 22 2020 at 20:55)</a>:</h4>
<p>which also argues (maybe) in favor of canonical form? or maybe it makes no difference</p>



<a name="210930052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930052">(Sep 22 2020 at 20:55)</a>:</h4>
<p>I think this is actually the problem I was running into when I attempted the placeholder canonicalization</p>



<a name="210930176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Areredify <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930176">(Sep 22 2020 at 20:56)</a>:</h4>
<p>not assumption, but the "generate rules that can be pasted into the program" thing</p>



<a name="210930191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930191">(Sep 22 2020 at 20:56)</a>:</h4>
<p>Aside, did anyone (me?) actually <em>try</em> making SLG use canonical goal for program clauses?</p>



<a name="210930220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930220">(Sep 22 2020 at 20:56)</a>:</h4>
<p>(I've got to go, maybe we can continue this async/next week?)</p>



<a name="210930232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930232">(Sep 22 2020 at 20:56)</a>:</h4>
<p>I can catch up if folks keep chatting though</p>



<a name="210930304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930304">(Sep 22 2020 at 20:57)</a>:</h4>
<p>Well, let's talk async as needed</p>



<a name="210930334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930334">(Sep 22 2020 at 20:57)</a>:</h4>
<p>if we come up with anything, we discuss at the beginning of next week</p>



<a name="210930352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/meeting%202020-09-22/near/210930352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/meeting.202020-09-22.html#210930352">(Sep 22 2020 at 20:57)</a>:</h4>
<p>otherwise, we can discussed <code>WellFormed</code> next week?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>